package StudyCode.summary.textfile;

import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class WriteTextFileWithPrintWriter {

	public static void main(String[] args) throws IOException {
		writeList();
	}

	private static void writeList() throws IOException,
			ArrayIndexOutOfBoundsException {
		PrintWriter out = new PrintWriter(new FileWriter("E:/Copy/test1.txt"));
		out.println("www.tah1986.com");
		out.close();
		System.out.println("使用 PrintWriter 写入文本文件(txt)成功");
	}
}
